package org.desktop.web.client.project.service;

import org.desktop.web.shared.domain.entities.Project;
import org.desktop.web.shared.domain.entities.SubProject;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.sencha.gxt.data.shared.loader.PagingLoadConfig;
import com.sencha.gxt.data.shared.loader.PagingLoadResult;

@RemoteServiceRelativePath("projects")
public interface ProjectService extends RemoteService {

	PagingLoadResult<Project> getProjects(String token,PagingLoadConfig loadConfig) throws Exception;
	
	PagingLoadResult<SubProject> getSubProjectsByIdProject(String token,String idProject,PagingLoadConfig loadConfig) throws Exception;
	
	boolean saveSubProject(String token, int idProject, SubProject sub)
			throws Exception;
	boolean saveProject(Project sub)
			throws Exception;
	
	boolean deleteSubProject(int id) throws Exception;

	boolean deleteProject(Project selectedItem) throws Exception;
}
